<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>我的账户</title>
	<meta http-equiv="Content-Type"  content="text/html; charset=UTF-8" />
	<link rel="icon" href="<c:url value="/img/favicon.ico"/>"/>
	<link media="all" href="<c:url value="/css/base.css"/>" type="text/css" rel="stylesheet"/>
	<link media="all" href="<c:url value="/css/order.css"/>" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="<c:url value="/js/jquery-1.2.6.js"/>"></script>
	<script src="<c:url value="/js/base-v1.js"/>" type="text/javascript"></script>
	
</head>
<body>
	<jsp:include page="/jsp/shortcut.jsp" />
	<jsp:include page="/jsp/header.jsp" />	
	<div class="w">
	    <div class="left">
			<div class="affile m">
				<div class="mt">
					<h2>
						我的账户
					</h2>
				</div>
				<div class="mc">
					<ul>
						<li class="fore">
							<a href="<c:url value="/order/listOrders.action"/>">我的订单</a>
						</li>
						<li>
							<a href="">我的心愿单</a>
						</li>
						<li>
							<a href="">账户设置</a>
						</li>
					</ul>
				</div>
			</div>    
		</div>
	    <div class="right">
	    	<div class="order m">
                <div class="mt1">我的订单</div>
                <div class="mt2">需要帮助？ 联系我们的客服人员 
                	<a href="mailto:contact@rs.com">contact@rs.com</a>. 
                </div>
                <div class="mc">
                	<div class="o-list">
                    	<div class="mtt">
                           	<span class="q1">订单日期</span>
                               <span class="q2">订单号</span>
                               <span class="q3">订单总价</span>
                               <span class="q4">订单状态</span>
                               <span class="q5">操作</span>
						</div>
                        <div class="mcc">
								<c:forEach var="item" items="${orders }">
									<ul>
										<li>
											<span class="d1">
												<fmt:formatDate value="${item.createDate }" type="date" dateStyle="long"/>
											</span>
											<span class="d2">
												<a href="<c:url value="/order/item.action?orderId=${item.orderId }"/>" target="_blank">
													${item.orderId }
												</a>
											</span>
											<span class="d3">￥&nbsp;${item.totalPrice }元</span>
											<c:choose>
												<c:when test="${item.orderStatus != 0 }">
													<span class="d4 red">
				            							<span class="d4 red">${item.status }</span>
				           				 			</span>
												</c:when>
												<c:otherwise>
														<span class="d4 grey">
					            							<span class="d4 grey">${item.status }</span>
					           				 			</span>
												</c:otherwise>
											</c:choose>
											<span class="d5">
												<c:if test="${item.orderStatus == 1 }">
													<a href="" onclick="payOrder(${item.orderId })" class="button1">立即支付</a>
												</c:if>
												<c:if test="${item.orderStatus == 1 || item.orderStatus == 2 }">
													<a onclick="CancelOrder(${item.orderId })" href="#" class="button1">取消订单</a>
												</c:if>
		            							
		            							<a href="<c:url value="/order/item.action?orderId=${item.orderId }"/>" target="_blank">查看订单详情</a>
		            						</span>
		            					</li>
									</ul>
								</c:forEach>
                           </div>
					</div>
                </div>
    		</div> 
	    </div>
		<span class="clr"></span>
	</div>
	<script type="text/javascript" src="<c:url value="/js/orderlist.js"/>"></script>
	<jsp:include page="/jsp/bottom.jsp" />
	
	<script src="<c:url value="/js/lib-v1.js"/>"  type="text/javascript"></script>
	
	<script type="text/javascript" src="<c:url value="/js/ja6.js"/>"></script>

</body>
</html>

 